import java.util.Scanner;
public class test2 {
    public static void main(String[] args) {
        Scanner cin=new Scanner(System.in);
        float a[]=new float[6];
        for(int i=0;i<6;i++){
            a[i]=cin.nextFloat();
        }
        float maxn=a[0],minn=a[0];
        int maxn_id=0,minn_id=0;
        for(int i=1;i<6;i++){
            if(maxn<a[i]){//更新最大值信息
                maxn=a[i];
                maxn_id=i;
            }
            if(minn>a[i]){//更新最小值信息
                minn=a[i];
                minn_id=i;
            }
        }
        System.out.println("最大值:"+maxn+" 位置为:"+maxn_id);
        System.out.println("最小值:"+minn+" 位置为:"+minn_id);
    }
}
